<template>
  <div class="about">
    <!--<mt-header fixed title="证书详情">
      <router-link to="/" slot="left">
        <mt-button icon="back"></mt-button>
      </router-link>
    </mt-header>-->

    <div class="content-box">
      <div class="padding-lr-32 padding-top-10">
        <div class="detail-banner">
          <div class="detail-person flex">
            <!--<div class="detail-per-img"></div>-->
            <div class="detail-per-des">
              <h3 class="title3">{{obj.ryName}}</h3>
              <p class="text">{{obj.ryRegTypeName}}</p>
            </div>
          </div>
          <!--<div class="per-error flex">
            <div class="per-error-label">
              <span class="tag tag-red">异常</span>
            </div>
            <div class="per-error-val red">
              <p>1.未实名制</p>
              <p>2.证书所在单位与在系统里登记的聘用单位不一致</p>
              <p>3.继续教育过期</p>
            </div>
          </div>-->
        </div>

        <div class="tab padding-tb-32">
          <a href="javascript:;" :class="{active: open}" @click="tab(1)">证书信息</a>
          <!--<a href="javascript:;" :class="{active: !open}" @click="tab(2)">证书轨迹</a>-->
        </div>

        <div class="info" v-if="open">

          <section class="info-item">
            <div class="info-item-small">
              <div class="info-item-small-label">出生年月</div>
              <div class="info-item-small-val">{{obj.birthday}}</div>
            </div>
            <div class="info-item-small">
              <div class="info-item-small-label">身份证号</div>
              <div class="info-item-small-val">{{obj.ryCardNo}}</div>
            </div>
            <div class="info-item-small">
              <div class="info-item-small-label">证书编号</div>
              <div class="info-item-small-val">{{obj.certNo}}</div>
            </div>
            <div class="info-item-small">
              <div class="info-item-small-label">注册编号</div>
              <div class="info-item-small-val">{{obj.certRegNo}}</div>
            </div>
          </section>

          <section class="info-item">

            <div class="info-item-small">
              <div class="info-item-small-label">注册单位</div>
              <div class="info-item-small-val">{{obj.qyName}}</div>
            </div>
            <div class="info-item-small">
              <div class="info-item-small-label">注册专业</div>
              <div class="info-item-small-val">
                <section v-for="(item,index) in obj.profArr" :key="index">
                  <!--<h4></h4>-->
                  <p>{{item.ryRegProfName}}</p>
                </section>
              </div>
            </div>
          </section>

          <section class="info-item">


            <div class="info-item-small">
              <div class="info-item-small-label">注册日期</div>
              <div class="info-item-small-val">{{obj.certBdate}}</div>
            </div>
            <div class="info-item-small">
              <div class="info-item-small-label">发证日期</div>
              <div class="info-item-small-val">{{obj.certIssueDate}}</div>
            </div>
            <div class="info-item-small">
              <div class="info-item-small-label">发证机关</div>
              <div class="info-item-small-val">{{obj.issueUnitName}}</div>
            </div>
          </section>

        </div>
        <div class="trajectory" v-if="!open"><!--证书轨迹暂时不用-->
          <section class="trajectory-item">
            <h4 class="title4 margin-bottom-10">变更注册 <span class="text">2018年12月15日</span></h4>
            <p>注册单位由“安徽省设计院”变更为“安徽省中铁四局股份责任有限公司”</p>
          </section>
          <section class="trajectory-item">
            <h4 class="title4 margin-bottom-10">变更注册 <span class="text">2018年12月15日</span></h4>
            <p>注册单位由“安徽省设计院”变更为“安徽省中铁四安徽省中铁四局股份责任有限公司安徽省中铁四局股份责任有限公司安徽省中铁四局股份责任有限公司局股份责任有限公司”</p>
          </section>
          <section class="trajectory-item">
            <h4 class="title4 margin-bottom-10">变更注册 <span class="text">2018年12月15日</span></h4>
            <p>注册单位由“安徽省设计院”变更为“安徽省中铁四局股份责任有限公司”</p>
          </section>
          <section class="trajectory-item">
            <h4 class="title4 margin-bottom-10">变更注册 <span class="text">2018年12月15日</span></h4>
            <p>注册单位由“安徽省设计院”变更为“安徽省中铁四局股份责任有限公司”</p>
          </section>
        </div>

      </div>
    </div>

  </div>
</template>
<script>

  export default {
    data() {
      return {
        open: true,
        obj:{}
      }
    },
    created() {
      this.obj = this.$route.query;
    },
    methods: {

      tab(data){
        this.open = data === 1;
      }

    }
  };
</script>
